package com.pubinfo.passbook.esb.controller;

import com.pubinfo.passbook.common.model.dubbo.ESBServiceData;
import com.pubinfo.passbook.common.model.vo.base.JsonResult;
import com.pubinfo.passbook.reference.ESBServiceReference;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Collection;

@RestController
@RequestMapping(value = "esb")
@Api(tags = "人力相关接口")
@Slf4j
public class ManpowerController {
  @Autowired
  ESBServiceReference esbService;
  
  @PostMapping("get")
  @ApiOperation(value = "获取数据")
  public JsonResult<Collection<ESBServiceData.CertDetail>> getManpower(@RequestBody ESBServiceData.Cert cert) {
    return JsonResult.success(esbService.getPersonsDetail(cert));
  }
}
